package com.woniuxy.userassembly.dao;

import com.woniuxy.userassembly.model.RbacRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.*;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Liyfi
 * @since 2021-05-22
 */
public interface RbacRoleMapper extends BaseMapper<RbacRole> {

    @Insert("insert into rbac_role (role_name) value(#{roleName})")
    int addRole(RbacRole role);

    @Select("select * from rbac_role where rbac_id =#{rbacId}")
    RbacRole selRole(int rbacId);

    @Delete("delete from rbac_role where role_id = #{roleId}")
    int delRole(int roleId);

    @Update("update rbac_role set role_name = #{roleName} where role_id =#{roleId}")
    int updRole(@Param("roleName") String roleName,@Param("roleId") int roleId);
}
